1. Field of the Invention
This invention relates generally to computer graphics, and more particularly to transparent memory access using a virtual frame buffer to access frame buffer memory, e.g., super frame buffer memory.
2. Description of the Related Art
When rendering an image, polygon edges that are not horizontal or vertical often appear jagged using conventional graphics systems because each pixel has finite physical dimensions. For example, since each pixel is essentially square, a diagonal line or edge rendered using the square pixels appears jagged, similar to a staircase. This effect is known as aliasing. To reduce aliasing, conventional graphics systems perform antialiasing, which helps reduce the effects that the physical dimensions of the pixels have on the appearance of objects being displayed. As a result of antialiasing, diagonal lines and edges appear smoother.
One common antialiasing technique is supersampling, which typically is performed for a portion of the display, called a tile, or the entire display at a time. Broadly speaking, each pixel in the tile or display is considered to be an M×N matrix of subpixels. Data for each polygon in the display is evaluated at each subpixel. Thus, the alpha value, color, and other data for the polygon can differ in, and is evaluated at, each subpixel.
FIG. 1 is a block diagram showing a conventional computer graphics system 100 that uses supersampling to perform antialiasing. As shown in FIG. 1, the computer graphics system 100 shows a superbuffer 102 for storing a multi-sampled display image, a memory frame buffer 104 for storing the actual displayed image, and an application 106 that creates and edits the actual displayed image. As mentioned above, each pixel in the actual displayed image is considered to be an M×N subpixel matrix that is stored in a superbuffer 102.
As is well known to those skilled in the art, current computer graphics standards often require that applications 106 have access to, and the ability to edit, images in the memory frame buffer 104. Hence, the conventional computer graphics system 100 needs to express the superbuffer 102 as a normal frame buffer, which can be accessed by the application 106. To this end, when the application 106 requests to access the memory frame buffer 104, the conventional computer graphics system 100 reduces the superbuffer 102 to the resolution of the normal memory frame buffer 104. Generally, this is done in manner similar to that described above, wherein the subpixels for each displayed pixel are sampled to determine the exact composition of the displayed pixel.
After the application 106 finishes editing the memory frame buffer 104, the conventional computer graphics system 100 recreates the superbuffer by expanding the memory frame buffer 104. In particular, each pixel within the memory frame buffer 104 is copied to all the subpixels comprising the M×N matrix for the pixels. Unfortunately, the process of reducing and expanding the superbuffer 102 to provide frame buffer access to applications 106 causes undesirable effects to occur in the image, as described next with reference to FIG. 2A.
FIG. 2A is a diagram showing a reduction and expanding pixel/subpixel process utilized in a conventional computer graphics system. As mentioned above, when the application requests to edit the memory frame buffer, the conventional computer graphics system reduces the superbuffer to the resolution of a normal frame buffer. For example, FIG. 2A shows a subpixel matrix 200a corresponding to a pixel of the normal frame buffer. In this example, the subpixel matrix 200a is a 2×2 matrix having two black subpixels and two white subpixels.
To reduce the superbuffer to the resolution of the normal frame buffer, the conventional computer graphics system examines the subpixels corresponding to each pixel of the normal frame buffer. The subpixels are then processed to generate the corresponding pixel. For example, in the subpixel matrix 200a, 50% of the subpixels are black and 50% of the subpixels are white. When processed, a pixel having 50% black and 50% white is generated, which results in a gray pixel 202.
More particularly, a filter kernel generally is used to process the subpixels of the superbuffer during reduction. The filter kernel is a function that processes a predefined number of subpixels to produce each pixel of the normal frame buffer. It should be noted that often the filter kernel is configured to process pixels in excess of the number of pixels comprising each subpixel matrix of the superbuffer, which can provide enhanced antialiasing. However, as noted below, a filter kernel thusly configured often also enhances undesirable color “bleeding” effects.
Once each pixel 202 of the normal frame buffer 104 has been created, the application can access and edit the contents of the frame buffer 104. In this manner, the application can edit or replace the displayed image that is stored in the frame buffer. Often, an application will only change the values of particular pixels within the frame buffer, leaving remaining pixels unaltered. For example, when displaying a menu screen an application generally only alters pixels of selected menu elements. As a result, many pixels of the frame buffer 104 can remain unaltered after the application has completed editing. In FIG. 2A, for example, the gray pixel 202 has not been altered by the application, and thus continues to have the same value as it did when first reduced.
When the application has completed accessing the normal frame buffer 104, the superbuffer is reconstructed by replicating the pixels of the normal frame buffer. Specifically, for each pixel of the normal frame buffer, the properties of the pixel are copied to each subpixel of the corresponding subpixel matrix of the super buffer. For example, in FIG. 2A, the gray color value of pixel 202 is copied to each subpixel in the new matrix 200b. 
Unfortunately, although the application program did not alter pixel 202, all the subpixels of the corresponding new subpixel matrix 200b have changed to gray. As a result, image color values can change throughout the image although they are not altered by the application program. In graphics systems wherein the filter kernel is configured to process pixels in excess of the number of pixels comprising each subpixel matrix of the superbuffer, this effect is compounded. In particular, color values continue to “bleed” into one another each time the superbuffer is reduced. As a result, in these configurations, the image can appear to continuously blur over time.
FIG. 2B illustrates another prior art system that performs supersampling in which the subpixels are spread out over four separate frame buffer memories. Within this system, two separate graphics chips are used, 210a and 210b, and four separate and separately addressable frame buffer memories are used 230a-230d. Each graphics chip 210a-210b renders into only the two frame buffers that are connected with it, e.g., chip 210a interfaces with and renders into frame buffers 230a and 230b and chip 210b interfaces with and renders into frame buffers 230c and 230c. The four frame buffers 230a-230d make up the superframe buffer 200a of FIG. 2A where there are four subpixels for each pixel of the displayed frame buffer. Each subpixel is stored in a respective frame buffer of buffers 230a-230d. When displaying an image on display 250, a combiner 240 (e.g., in the master device of the graphics chips) performs an aggregation function on the four subpixels from the frame buffers 230a-230d and outputs a single value for the pixel. A processor 220 interfaces with chips 210a and 210b. In systems of FIG. 2B that are supersampled, four Z values and four color values are stored for each pixel; that is each subpixel contributes a respective color and a respective Z value.
In operation, when writing a triangle primitive into the frame buffers, each graphics chip would write into one of its frame buffers, e.g., 230a, and then jitter the primitive and write the jittered version into the second frame buffer, e.g., 230b. On read back, the subpixels from the frame buffers 230a-230d were aggregated as described above.
A problem with the system of FIG. 2B is that it is complicated because it requires four separate frame buffer memories to provide a superbuffer having four subpixels per frame buffer pixel. Each graphics chip can only render into two frame buffer memories. Therefore, if more subpixels are required per pixel, then more graphics chips would be required. Moreover, the aggregation function 240 is computationally expensive and the time required to separately address each of the four frame buffers 230a-230d can reduce graphics performance.
In view of the foregoing, there is a need for systems and methods for antialiasing that provide enhanced antialiasing without undesirable side effects, such as color value changes and blurring. The methods should further allow application programs to access the buffer as required by current industry standards.